﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace shfa.snomtastic.systray.components
{


    public class HideToastInfo
    {

        public enum HideToastModeType { Never = 0, Always = 1, Busy = 2 };

        public HideToastModeType HideToastMode { get; set; }
        public PresenceStateInfo.PresenceStateType PresenceState { get; set; }

        public bool HideToast
        {
            get
            {
                

                switch (HideToastMode)
                {
                    case HideToastModeType.Never:
                        return false;
                    case HideToastModeType.Always:
                        return true;
                    case HideToastModeType.Busy:
                        switch (PresenceState)
                        {
                            case PresenceStateInfo.PresenceStateType.Available:
                            case PresenceStateInfo.PresenceStateType.AvailableIdle:
                            case PresenceStateInfo.PresenceStateType.BeRightBack:
                            case PresenceStateInfo.PresenceStateType.Away:
                            case PresenceStateInfo.PresenceStateType.Offline:
                            case PresenceStateInfo.PresenceStateType.unknown:
                                return true;
                            case PresenceStateInfo.PresenceStateType.Busy:
                            case PresenceStateInfo.PresenceStateType.BusyIdle:
                            case PresenceStateInfo.PresenceStateType.DoNotDisturb:
                            default:
                                return false;
                        }
                    default:
                        return false;
                }
            }
        }

        public HideToastInfo(HideToastModeType hideToastMode, PresenceStateInfo.PresenceStateType presenceState)
        {
            this.HideToastMode = hideToastMode;
            this.PresenceState = presenceState;
        }
    }
}
